/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2021.
 * Description: machine hisi platform smp header file
 * Author: yanbo <joey.yanbo@huawei.com>
 * Create: 2020-11-19
 */
#ifndef MACH_HISI_PLATSMP_H
#define MACH_HISI_PLATSMP_H

extern void hisi_secondary_startup(void);
extern void hisi_secondary_init(unsigned int cpu);
extern int  hisi_boot_secondary(unsigned int cpu, struct task_struct *idle);
extern volatile void *fabric_base;
extern volatile unsigned int slave_boot_addr;
extern volatile unsigned int slave_boot_times;
extern volatile unsigned int slave_l1_invalid;
extern void hisi_dt_smp_map_io(void);

extern int cpu_aff_level;
extern int cluster_aff_level;
extern unsigned int cpu_per_cluster;
extern unsigned int mpidr_to_phyid(unsigned int mpidr);

#define aff_level_set() ((cpu_aff_level != -1) && (cluster_aff_level != -1))

extern struct smp_operations   hisi_a9_smp_ops;
extern struct smp_operations   hisi_a15_smp_ops;

extern int register_core_reset_handle(void (*handle)(unsigned int));
#endif
